<html>
<head><meta charset="utf-8"><title>Raz has silly git questions · project-portable-simd · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/index.html">project-portable-simd</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html">Raz has silly git questions</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="224971939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/224971939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#224971939">(Feb 03 2021 at 04:19)</a>:</h4>
<p><span class="user-mention" data-user-id="281757">@Jubilee</span> So I have a branch here <a href="https://github.com/miguelraz/stdsimd?organization=miguelraz&amp;organization=miguelraz">https://github.com/miguelraz/stdsimd?organization=miguelraz&amp;organization=miguelraz</a> that fixes the <code>AsRef -&gt; as_slice()</code> ugliness.<br>
But that branch is based on my repo - How can I pull in the changes from the main branch in <code>stdsim</code> ito my own <code>main</code> and then rebase the commits of <code>as-slice-fixes</code> onto that?</p>
<p>... Because usually I just nuke the fork and make a new one with the new changes and... yeah...</p>



<a name="224972012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/224972012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#224972012">(Feb 03 2021 at 04:21)</a>:</h4>
<p>Also I'm going to bed but will read this early and will read some git theory tomorrow so as to not be such a n00b at it.</p>



<a name="224972095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/224972095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#224972095">(Feb 03 2021 at 04:23)</a>:</h4>
<p>this is what <code>git rebase &lt;trunk&gt; &lt;branch&gt;</code> is for, basically.</p>



<a name="224972168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/224972168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#224972168">(Feb 03 2021 at 04:24)</a>:</h4>
<p>that said I think you can just open the PR? Since your stuff was accepted it should basically be the same? idk.</p>



<a name="225027624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225027624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225027624">(Feb 03 2021 at 15:05)</a>:</h4>
<p>I've made a new mess on the <code>as-slices-pretty</code> PR now :/</p>



<a name="225029022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225029022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225029022">(Feb 03 2021 at 15:14)</a>:</h4>
<p>Alright so now I mixed up commits from the <code>as-slices</code> with the old comits into a single PR.</p>
<p>Normally I would delte the fork, PR and start from scratch (given that it's a tiny change.) but that does not seem sustainable dev ops :/</p>



<a name="225033860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225033860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225033860">(Feb 03 2021 at 15:46)</a>:</h4>
<p>oh nooo lol.</p>



<a name="225034229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225034229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225034229">(Feb 03 2021 at 15:49)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span><br>
back the branch out of your rebase attempt by resetting to a place in the reflog,<br>
then <code>git reset HEAD~N</code> where N is the number of commits that are supposed to only be in that PR.<br>
<code>git stash</code><br>
then switch to main, delete the PR branch and remake it from main, and <code>git stash apply</code></p>



<a name="225100393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225100393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225100393">(Feb 03 2021 at 23:47)</a>:</h4>
<p>Huh, I think it worked...</p>



<a name="225102060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225102060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225102060">(Feb 04 2021 at 00:06)</a>:</h4>
<p>yep!</p>



<a name="225102127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225102127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225102127">(Feb 04 2021 at 00:07)</a>:</h4>
<p>:3 So you see, sometimes rebuilding <strong>is</strong> the correct strategy,  but as you have noticed, it is more efficient to rebuild <strong>less</strong> than "the entire repo". If one can.</p>



<a name="225102248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225102248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225102248">(Feb 04 2021 at 00:08)</a>:</h4>
<p>yup yup</p>



<a name="225102278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225102278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225102278">(Feb 04 2021 at 00:09)</a>:</h4>
<p>I REally really wish I'd heard of <code>git reflog</code> before.</p>



<a name="225102395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225102395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225102395">(Feb 04 2021 at 00:10)</a>:</h4>
<p>git stash is one of the more useful of the "obscure" commands, because it lets you quickly move diffs around like that.</p>



<a name="225112383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225112383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225112383">(Feb 04 2021 at 02:35)</a>:</h4>
<p>Alright if I started a RustLang stream to make a few SIMD examples for some perhaps future docs would anyone be interested ?</p>



<a name="225112390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225112390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225112390">(Feb 04 2021 at 02:35)</a>:</h4>
<p>(I've not used the Zulip videocall thingy before but am willing to try it if it doesn't bork the site for others.)</p>



<a name="225112632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225112632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225112632">(Feb 04 2021 at 02:40)</a>:</h4>
<p><span class="user-mention" data-user-id="281757">@Jubilee</span> I've done coding streams and tutorials in the past - they really help learning and building cool stuff</p>



<a name="225112643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225112643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225112643">(Feb 04 2021 at 02:40)</a>:</h4>
<p><a href="https://www.youtube.com/watch?v=EkgCENBFrAY">https://www.youtube.com/watch?v=EkgCENBFrAY</a></p>
<div class="youtube-video message_inline_image"><a data-id="EkgCENBFrAY" href="https://www.youtube.com/watch?v=EkgCENBFrAY"><img src="https://i.ytimg.com/vi/EkgCENBFrAY/default.jpg"></a></div>



<a name="225112652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225112652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225112652">(Feb 04 2021 at 02:40)</a>:</h4>
<p>And the stream (a bit dusty) is here <br>
<a href="https://www.twitch.tv/brainrpg">https://www.twitch.tv/brainrpg</a></p>



<a name="225112895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225112895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225112895">(Feb 04 2021 at 02:45)</a>:</h4>
<p>ohhhhhhh. Perhaps!</p>



<a name="225112963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225112963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225112963">(Feb 04 2021 at 02:46)</a>:</h4>
<p>OK</p>



<a name="225112973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225112973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225112973">(Feb 04 2021 at 02:47)</a>:</h4>
<p>I will start a  jitsi thing here if people wanna check it as I work on some examples</p>



<a name="225112975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225112975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225112975">(Feb 04 2021 at 02:47)</a>:</h4>
<p><a href="https://meet.jit.si/550373528225847">Click to join video call</a></p>



<a name="225113296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225113296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225113296">(Feb 04 2021 at 02:54)</a>:</h4>
<p>oh uhm now aaa.</p>



<a name="225113490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225113490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225113490">(Feb 04 2021 at 02:59)</a>:</h4>
<p>LOL can't even do a hello world with <code>use core_simd::*;</code>.</p>



<a name="225115271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115271">(Feb 04 2021 at 03:35)</a>:</h4>
<p>So a question for the Rust wizards.<br>
Const generics allows you to specialize functions with integers at compile time for now right?</p>



<a name="225115375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115375">(Feb 04 2021 at 03:37)</a>:</h4>
<p>Correct, you use a type parameter that is specified, instead of like <code>&lt;T&gt;</code>, as <code>&lt;const T: ${type}&gt;</code></p>



<a name="225115379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115379">(Feb 04 2021 at 03:37)</a>:</h4>
<p>Not specialize, but parameterize</p>



<a name="225115396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115396">(Feb 04 2021 at 03:38)</a>:</h4>
<p>and yes specialization is technically a different thing.</p>



<a name="225115424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115424">(Feb 04 2021 at 03:38)</a>:</h4>
<p>Ok ok</p>



<a name="225115441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115441">(Feb 04 2021 at 03:38)</a>:</h4>
<p>Specialize would be overloading a particular set of parameters of a generic with a "specialized" implementation</p>



<a name="225115474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115474">(Feb 04 2021 at 03:39)</a>:</h4>
<p>OK OK gotcha. But the compiler technically will leverage the knowledge that those <code>const</code> things will ahve at compile time right?</p>



<a name="225115573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115573">(Feb 04 2021 at 03:41)</a>:</h4>
<p>Yep</p>



<a name="225115580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115580">(Feb 04 2021 at 03:41)</a>:</h4>
<p>OK wait a sec</p>



<a name="225115587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115587">(Feb 04 2021 at 03:41)</a>:</h4>
<p>What if I have a function</p>



<a name="225115592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115592">(Feb 04 2021 at 03:41)</a>:</h4>
<p>It doesn't <em>have</em> to evaluate it at compile time but it is allowed to</p>



<a name="225115638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115638">(Feb 04 2021 at 03:42)</a>:</h4>
<p>and that function needs 2 parameters that I determine a, N, M, and then it munges on a bunch of data.</p>



<a name="225115640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115640">(Feb 04 2021 at 03:42)</a>:</h4>
<p>But!</p>



<a name="225115652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115652">(Feb 04 2021 at 03:42)</a>:</h4>
<p>The munging of the data can be incredibly sped up with SIMD stuff  if I can calculate a matrix that dependes on knowing the values of N,M</p>



<a name="225115668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115668">(Feb 04 2021 at 03:43)</a>:</h4>
<p>So N =3, M = 4 would be something like "Oh, you need to calculate these coefficients of a 3x4 matrix. Here's your super optimized loop"</p>



<a name="225115733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115733">(Feb 04 2021 at 03:44)</a>:</h4>
<p>But if I passed in N = 5, M = 3, those same coefficietns and the looping and indexing would need to change quite a bit as well.</p>



<a name="225115754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115754">(Feb 04 2021 at 03:45)</a>:</h4>
<p>Would rust generate a different function for each of those at runtime? Or it needs to know at compile time all my possible combinations of those parameters that I want to use.</p>



<a name="225115765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115765">(Feb 04 2021 at 03:45)</a>:</h4>
<p>(Sorry for lack of clarity I'm handwaving some Julia code I wrote that is very heavy on the SIMD optimized metaprogramming and not all of it is easily Rust-translateable)</p>



<a name="225115770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115770">(Feb 04 2021 at 03:45)</a>:</h4>
<p>Yes, each one "monomorpisation" of a generic function is its own function</p>



<a name="225115825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115825">(Feb 04 2021 at 03:46)</a>:</h4>
<p>OK cool, so it would be monomorphized.</p>



<a name="225115838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115838">(Feb 04 2021 at 03:47)</a>:</h4>
<p>But if I only called the N=3, M=4 version, and the N=5,M=3 version, only those versions would be compiled and used right?</p>



<a name="225115889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115889">(Feb 04 2021 at 03:48)</a>:</h4>
<p>Yup</p>



<a name="225115925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225115925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225115925">(Feb 04 2021 at 03:49)</a>:</h4>
<p>OK, last question - can my function have macros inside it and not mess with the monomorphization*?</p>



<a name="225116091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116091">(Feb 04 2021 at 03:53)</a>:</h4>
<p>Macros just turn into normal code before it gets to that point</p>



<a name="225116095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116095">(Feb 04 2021 at 03:53)</a>:</h4>
<p>So yes</p>



<a name="225116112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116112">(Feb 04 2021 at 03:53)</a>:</h4>
<p>Oh that's neat.</p>



<a name="225116185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116185">(Feb 04 2021 at 03:54)</a>:</h4>
<p>I <em>think</em> that means I could port this code to Rust</p>



<a name="225116186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116186">(Feb 04 2021 at 03:54)</a>:</h4>
<p><a href="https://github.com/miguelraz/StagedFilters.jl">https://github.com/miguelraz/StagedFilters.jl</a></p>



<a name="225116214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116214">(Feb 04 2021 at 03:55)</a>:</h4>
<p>Which is a generalized version of the "rolling average" function, but with some other nice statistical properties and  hand unrolled SIMD loops for all possible combinations of M,N</p>



<a name="225116590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116590">(Feb 04 2021 at 04:02)</a>:</h4>
<p>Oh and last I checked it was 2x faster than the SciPy implementation, and it should work with GPUs because Julia <span aria-label="muscle" class="emoji emoji-1f4aa" role="img" title="muscle">:muscle:</span> (but I haven't touched it in a while so shhhh)</p>



<a name="225116700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116700">(Feb 04 2021 at 04:04)</a>:</h4>
<p>yeah functions in Rust are consistently monomorphized to their type parameters and dead code is eliminated as usual, you will see a function does dynamic dispatch instead of is monomorphized because the type it works on will be behind a pointer.</p>



<a name="225116727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116727">(Feb 04 2021 at 04:05)</a>:</h4>
<p>eventually such Dynamically Sized Types might actually get on the stack but they will have distinct type signatures because it will be things like Trait Objects and such.</p>



<a name="225116734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116734">(Feb 04 2021 at 04:05)</a>:</h4>
<p>DST?</p>



<a name="225116806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116806">(Feb 04 2021 at 04:07)</a>:</h4>
<p>Dynamically Sized Type.<br>
A trait object will generally look like Box&lt;dyn Trait&gt; (the Box is the pointer) but there's gradually evolving syntax that allows just dyn Trait to be specified in most cases.</p>



<a name="225116914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225116914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225116914">(Feb 04 2021 at 04:09)</a>:</h4>
<p>Gotcha. Thx!</p>



<a name="225260509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225260509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225260509">(Feb 05 2021 at 04:32)</a>:</h4>
<p>Alright gang - I will attempt some Rust exercisms (where <span class="user-mention" data-user-id="281757">@Jubilee</span> is a maintainer).<br>
Feel free to drop by!</p>



<a name="225262208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225262208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225262208">(Feb 05 2021 at 05:09)</a>:</h4>
<p>(Will start soonish - currently upping my git-foo with <a href="https://codewords.recurse.com/issues/two/git-from-the-inside-out">https://codewords.recurse.com/issues/two/git-from-the-inside-out</a>)</p>



<a name="225359813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225359813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225359813">(Feb 05 2021 at 21:26)</a>:</h4>
<p>obligatory link to <a href="https://git-scm.com/doc">https://git-scm.com/doc</a><br>
the hosted manpages may not be very useful but the books, cheatsheets, etc. are</p>



<a name="225363874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225363874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225363874">(Feb 05 2021 at 22:03)</a>:</h4>
<p>Ooh, I'd never seen those links. Thanks!</p>



<a name="225368283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/225368283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#225368283">(Feb 05 2021 at 22:46)</a>:</h4>
<p>Alright. Actual friday stream for some exercisms after I learn some git.</p>



<a name="226265336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/226265336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#226265336">(Feb 13 2021 at 20:31)</a>:</h4>
<p><span class="user-mention" data-user-id="281757">@Jubilee</span> If I want to try and run Caleb's PR locally, what's the procedure?</p>
<ol>
<li>Add his branch to my local machine with <code>git remote add caleb ...</code></li>
<li>Switch to it</li>
<li>Run the test?</li>
</ol>



<a name="226265465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Raz%20has%20silly%20git%20questions/near/226265465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Raz.20has.20silly.20git.20questions.html#226265465">(Feb 13 2021 at 20:33)</a>:</h4>
<p>Answering my question:</p>
<ol>
<li>Pull the branch locally with<code>git pull origin feature/proptest</code></li>
<li>Switch to it with <code>git checkout --track origin/feature/proptest</code></li>
</ol>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>